﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.ComponentModel;

namespace CITWebsite.Models
{
    [MetadataType(typeof(UserMetadata))]
    public partial class USER
    {
        class UserMetadata
        {
            [HiddenInput]
            public long ID { get; set; }

            [DataType(DataType.Text)]
            [DisplayName("UserName")]
            [Required(ErrorMessage = "UserName is not empty")]
            [StringLength(20, ErrorMessage = "UserName cannot have more than 20 characters")]
            public string UserName { get; set; }

            [DataType(DataType.Text)]
            [DisplayName("Password")]
            [Required(ErrorMessage = "Password is not empty")]
            [StringLength(20, ErrorMessage = "Password cannot have more than 20 characters")]
            [ValidatePasswordLength]
            public string Password { get; set; }

            [DataType(DataType.Text)]
            [DisplayName("FullName")]
            [Required(ErrorMessage = "FullName is not empty")]
            [StringLength(50, ErrorMessage = "Password cannot have more than 50 characters")]
            public string FullName { get; set; }

            [DataType(DataType.Text)]
            [DisplayName("Type")]
            [Required(ErrorMessage = "Type is not empty")]
            [StringLength(20, ErrorMessage = "Type cannot have more than 20 characters")]
            public string Type { get; set; }

            [DisplayName("Active")]
            public bool IsActive { get; set; }

        }

    }
}